using System;
using System.Diagnostics;

namespace HgAdapter
{
	public class HgInit : HgCommand
	{
		public void Run(string folderPath)
		{
			string saveCurrentDirectory = Environment.CurrentDirectory;
			Environment.CurrentDirectory = folderPath;

			Process hgProcess = Process.Start(HgStatusStartInfo("init"));
			hgProcess.WaitForExit();

			Environment.CurrentDirectory = saveCurrentDirectory;
		}
	}
}
